<?php
    header("content-type:text/html;charset=utf8");
    $id = $_POST['id'];
    $con = mysqli_connect('localhost','root','root','info');
    $res = mysqli_query($con,"select * from travel where id = $id ");
    $row = mysqli_fetch_assoc($res);
    if($row) {
        $arr = [
            "meta" => [
                "status" => 101,
                "msg" => "访问成功"
            ],
            "data" => $row
        ];
    }else{
        $arr = [
            "meta" => [
                "status" => 102,
                "msg" => "访问错误"
            ],
            "data" => null
        ]; 
    }
    echo json_encode($arr);